namespace Hack.Decompiling.PEA.PE
{
  using System;
  using System.IO;
  using System.Diagnostics;
  using System.Collections.Generic;
  using System.Text;

  public interface DataDirectory
  {
    ImageDataDirectory Entry { get; set;}
  }

  ////
  //// Thread Local Storage
  ////

  //typedef VOID
  //(NTAPI *PIMAGE_TLS_CALLBACK) (
  //    PVOID DllHandle,
  //    DWORD Reason,
  //    PVOID Reserved
  //    );

  //typedef struct _IMAGE_TLS_DIRECTORY64 {
  //    ULONGLONG   StartAddressOfRawData;
  //    ULONGLONG   EndAddressOfRawData;
  //    ULONGLONG   AddressOfIndex;         // PDWORD
  //    ULONGLONG   AddressOfCallBacks;     // PIMAGE_TLS_CALLBACK *;
  //    DWORD   SizeOfZeroFill;
  //    DWORD   Characteristics;
  //} IMAGE_TLS_DIRECTORY64;
  //typedef IMAGE_TLS_DIRECTORY64 * PIMAGE_TLS_DIRECTORY64;

  //typedef struct _IMAGE_TLS_DIRECTORY32 {
  //    DWORD   StartAddressOfRawData;
  //    DWORD   EndAddressOfRawData;
  //    DWORD   AddressOfIndex;             // PDWORD
  //    DWORD   AddressOfCallBacks;         // PIMAGE_TLS_CALLBACK *
  //    DWORD   SizeOfZeroFill;
  //    DWORD   Characteristics;
  //} IMAGE_TLS_DIRECTORY32;
  //typedef IMAGE_TLS_DIRECTORY32 * PIMAGE_TLS_DIRECTORY32;

  //#ifdef _WIN64
  //#define IMAGE_ORDINAL_FLAG              IMAGE_ORDINAL_FLAG64
  //#define IMAGE_ORDINAL(Ordinal)          IMAGE_ORDINAL64(Ordinal)
  //typedef IMAGE_THUNK_DATA64              IMAGE_THUNK_DATA;
  //typedef PIMAGE_THUNK_DATA64             PIMAGE_THUNK_DATA;
  //#define IMAGE_SNAP_BY_ORDINAL(Ordinal)  IMAGE_SNAP_BY_ORDINAL64(Ordinal)
  //typedef IMAGE_TLS_DIRECTORY64           IMAGE_TLS_DIRECTORY;
  //typedef PIMAGE_TLS_DIRECTORY64          PIMAGE_TLS_DIRECTORY;
  //#else
  //#define IMAGE_ORDINAL_FLAG              IMAGE_ORDINAL_FLAG32
  //#define IMAGE_ORDINAL(Ordinal)          IMAGE_ORDINAL32(Ordinal)
  //typedef IMAGE_THUNK_DATA32              IMAGE_THUNK_DATA;
  //typedef PIMAGE_THUNK_DATA32             PIMAGE_THUNK_DATA;
  //#define IMAGE_SNAP_BY_ORDINAL(Ordinal)  IMAGE_SNAP_BY_ORDINAL32(Ordinal)
  //typedef IMAGE_TLS_DIRECTORY32           IMAGE_TLS_DIRECTORY;
  //typedef PIMAGE_TLS_DIRECTORY32          PIMAGE_TLS_DIRECTORY;
  //#endif

  //typedef struct _IMAGE_IMPORT_DESCRIPTOR {
  //    union {
  //        DWORD   Characteristics;            // 0 for terminating null import descriptor
  //        DWORD   OriginalFirstThunk;         // RVA to original unbound IAT (PIMAGE_THUNK_DATA)
  //    };
  //    DWORD   TimeDateStamp;                  // 0 if not bound,
  //                                            // -1 if bound, and real date\time stamp
  //                                            //     in IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT (new BIND)
  //                                            // O.W. date/time stamp of DLL bound to (Old BIND)

  //    DWORD   ForwarderChain;                 // -1 if no forwarders
  //    DWORD   Name;
  //    DWORD   FirstThunk;                     // RVA to IAT (if bound this IAT has actual addresses)
  //} IMAGE_IMPORT_DESCRIPTOR;
  //typedef IMAGE_IMPORT_DESCRIPTOR UNALIGNED *PIMAGE_IMPORT_DESCRIPTOR;

  ////
  //// New format import descriptors pointed to by DataDirectory[ IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT ]
  ////

  //typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR {
  //    DWORD   TimeDateStamp;
  //    WORD    OffsetModuleName;
  //    WORD    NumberOfModuleForwarderRefs;
  //// Array of zero or more IMAGE_BOUND_FORWARDER_REF follows
  //} IMAGE_BOUND_IMPORT_DESCRIPTOR,  *PIMAGE_BOUND_IMPORT_DESCRIPTOR;

  //typedef struct _IMAGE_BOUND_FORWARDER_REF {
  //    DWORD   TimeDateStamp;
  //    WORD    OffsetModuleName;
  //    WORD    Reserved;
  //} IMAGE_BOUND_FORWARDER_REF, *PIMAGE_BOUND_FORWARDER_REF;

}
